﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace HexagonWeb.Models
{
    public class Message
    {
        public int ID { get; set; }


        [Display(Name = "标题")]
        public string Title { get; set; }

        [Display(Name = "内容")]
        public string Content { get; set; }


        [Display(Name = "发布时间")]
       [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString="{0:yyyy-MM-dd}",ApplyFormatInEditMode = true)]
        public DateTime PublishTime { get; set; }

        public class MessageDbContext : DbContext
        {
            public DbSet<Message> Messages { get; set; }
        }
    }
}
